/*
 * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@use 'sass:map';
@use 'node_modules/@angular/material' as mat;
@use '@gravitee/ui-particles-angular' as gio;

$typography: map.get(gio.$mat-theme, typography);
$foreground: map.get(gio.$mat-theme, foreground);

:host {
  display: inline-block;
}

.form-slide-toggle {
  display: flex;
  align-items: center;
  height: 60px;
  //   width: 100%;

  &.appearance-fill {
    padding: 0 0.75em 0 0.75em;
  }

  &__field {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-width: 180px;
    flex: 1 1 auto;

    &__text {
      flex: 1 1 100%;
      display: flex;
      flex-direction: column;

      &__label-1 {
        @include mat.typography-level($typography, body-2);
      }

      &__label-2 {
        @include mat.typography-level($typography, body-1);
      }

      &.disabled {
        color: mat.get-color-from-palette($foreground, disabled-text);
      }
    }
  }
}

// to change style in component provide by ng-content
::ng-deep .form-slide-toggle__icon {
  .mat-icon {
    font-size: 150%;
    line-height: 1.125;
  }
}
